package com.xmx.usercenter.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xmx.common.utils.R;
import com.xmx.usercenter.entity.OauthClientEntity;
import com.xmx.usercenter.service.AddressService;
import com.xmx.usercenter.service.OauthClientService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

//import org.apache.shiro.authz.annotation.RequiresPermissions;


/**
 * 收货地址表
 *
 * @author fbb
 * @email boyinbing@126.com
 * @date 2021-08-11 01:37:15
 */
@Api(tags = "OauthClientController", description = "权限表")
@RestController
@RequestMapping("usercenter/sysoauthclient")
public class OauthClientController {
    @Autowired
    private OauthClientService oauthClientService;


    @GetMapping("/list")
    public R list(@RequestParam("client_id") String clientId){
        QueryWrapper<OauthClientEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(OauthClientEntity::getClientId,clientId);
        OauthClientEntity oauthClientServiceById = oauthClientService.getOne(queryWrapper);
        return R.ok().put("data",oauthClientServiceById);
    }

}
